﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace DbInsert
{
    class Program
    {
        static void Main(string[] args)
        {
            string connectionString = "data source=.;Initial Catalog=MyDb;Integrated Security=True";
            SqlConnection connection = new SqlConnection(connectionString);

            string query = "insert into MyTable (Name, SurName) VALUES('name1', 'surname1')";
            SqlCommand command = new SqlCommand(query, connection);

            connection.Open();

            command.ExecuteNonQuery();

            connection.Close();
        }
    }
}
